<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page session="false"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:useBean id="itemController"
	class="io.ewolf.ssm.controller.ItemController" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改商品信息</title>
</head>
<body>

	<!-- 显示错误信息 -->
	<c:if test="${allErrors != null }">
		<c:forEach items="${allErrors}" var="error">
		 ${error.defaultMessage}<br>
		</c:forEach>
	</c:if>

	<form id="itemForm" action="${pageContext.request.contextPath }/item/editItemSubmit.action" method="post" >
		<input type="hidden" name="id" value="${item.id}"> 
		修改商品信息：
		<table style="test-align: left; width: 100%;" border="1">
			<tr>
				<td>商品名称</td>
				<td><input type="text" name="itemname" value="${item.itemname }" /></td>
			</tr>
			<tr>
				<td>商品颜色</td>
				<td><input type="text" name="color" value="${item.color }" /></td>
			</tr>
			<tr>
				<td>生产日期</td>
				<td><input type="text" name="producetime" value="<fmt:formatDate value="${item.producetime}" pattern="yyyy-MM-dd HH:mm:ss"/>" /></td>
			</tr>
			<tr>
				<td>产地</td>
				<td><input type="text" name="produceaddress" value="${item.produceaddress }" /></td>
			</tr>
			<tr>
				<td>orderdetail_id</td>
				<td><input type="text" name="orderdetail_id" value="${item.orderdetail_id }" /></td>
			</tr>
			<tr>
				<td>商品简介</td>
				<td><textarea rows="3" cols="30" name="detail">${item.detail }</textarea></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit" value="提交" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>